% Name: Grid
% Description: Grids for chinese characters writing practise
% 
% Last modified
% Date: 2018/03/22
% Author: Jan Vorisek <jan@vorisek.me>

\documentclass[]{report}

\usepackage{hanzibox} % Display character boxes with various options
\usepackage{pgffor}   % foreach loop
\usepackage{hyperref} % for http link
\usepackage{lastpage} % show page/lastPage
\usepackage{fancyhdr}
\usepackage[top=2.5cm,bottom=1.5cm,left=2.5cm,right=1.5cm,headsep=1cm,footskip=0pt]{geometry}

%% Grid settings 
% Number of A4 pages
\newcommand\pages{1}
% Style of inner grid: none/star/cross
\newcommand\innerStyle{none}
%% /Grid settings

\pagestyle{fancy}

% Header
\lhead{Character sheet \,--\, empty boxes}
\rhead{Hanzisheets}

% Footer
\lfoot{Created by \href{mailto:jan@vorisek.me?subject=Hanzisheets}{Jan Vorisek}}
\cfoot{\thepage/\pageref{LastPage}}
\rfoot{\url{https://hanzisheets.vorisek.me}}

% Border under header and over footer
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}

% Disable space between character boxes
\setlength{\parskip}{0pt}%
% No paragraph indentation to save horizontal space
\setlength{\parindent}{0pt}%

\begin{document}
	\centering%
	% 21 rows and 15 columns = A4 paper
	\foreach \m in {1,...,\the\numexpr\pages*23\relax}{%
		\foreach \n in {1,...,17}{%
			\hanzibox{}{inner=\innerStyle}%
			\hspace{-0.4pt}%
		}%
		\par\nointerlineskip\vspace{-0.4pt}%
	}%
\end{document}